package com.liss.boot.java8.stream;

import java.util.Arrays;
import java.util.List;

public class Test6 {
    public static void main(String[] args) {
        List<Integer> list = Arrays.asList(7, 6, 4, 8, 2, 11, 9);
        long count = list.stream().filter(x -> x > 6).count();
        System.out.println("list中大于6的元素个数：" + count);

    }
}
